﻿using System;
using System.IO;
using System.Threading;
using System.Windows.Forms;
using EO.WebBrowser;
using log4net.Config;

namespace Browser
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            XmlConfigurator.Configure(
                new FileInfo(Environment.CurrentDirectory + @"\log4net.config"));
            Application.ThreadException += Application_ThreadException;

            Runtime.AddLicense(
                "dKbW+q183/YAGORbl6QHEPGs4PP/6KFqrbLBzZ9otZGby591puX9F+6wtZGby5915vb1EPGC5eoAy+Oa6+nOza9rprTD2rFpqLqzy/We6ff6Gu12mbXHzZ9otZGby5916u34GeCt7Pb26eCJ39AG48ONqLvn+sWHutn++86nwtXO6Lto6u34GeCt7Pb26YxDl6TN2uui2un/HuR3hI514+30EO2s3MKetZ9Zs/D6DuSn6unaD71qqrnJ369pp7jH566l4Of2GfKewOjPuIlZl8D9FOKe5ff2EJ+n2PH26KGA6fMGG8ya5eX4EPFbtcDAF+ic3PIEEOR3hI6xy7ua4/AAIr1GgaSx5+Cd26QFJO+etA==");

            Application.Run(new Mainform());
        }

        private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
        {
            LogHelper.WriteLog(e.Exception);
            MyMessageBox.ShowErrorMsg(e.Exception.Message);
        }      
    }
}
